<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> -->
    <title></title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

    </style>
</head>
<body>
<!-- 今日客流总数 -->
<div id="ledger3" style="width: 100%;height: 100vh;"></div>

<!-- 实时交易笔数趋势 -->
<!--<div id="ledger4" style="width: 40vh;height: 30vh;"></div>-->

<!-- 会员交易占比 -->
<!-- <div id="ledger6" style="width: 40vh;height: 30vh;"></div> -->

<!-- 今日商户交易榜 -->
<!-- <div id="ledger7" style="width: 40vh;height: 30vh;"></div> -->

<!-- 今日畅销榜 -->
<!--<div id="ledger8" style="width: 40vh;height: 30vh;"></div> -->

</body>
<script src="./echarts.min.js"></script>
<script src="./index05.js"></script>
<script>

    var jsonData1 = {
        ledger3X:['1时','2时','3时','4时','5时','6时','7时','8时','9时'],
        ledger3Y:[20,23,24,23,22,23,25,22,26],
        ledger3Color:'#11EDB6'        
    }
    var jsonData2 = {
        ledger4X:['00:00','02:00','03:00','04:00','05:00','06:00','07:00','08:00','09:00'],
        ledger4Y:[20,23,24,23,22,23,25,22,26],
        ledger4Color:'#19D1FF'
    }
    var jsonData3 = {
        ledgerData:[{value:460, name:'会员'},{value:540, name:'非会员'}],
        colors:['#F18082','#56EA61']       
    }
    var jsonData4 = {
        xData:['陈董桥','李聪圣','许阿三','刘聪强','温伟亮','赵铮铮'],
        yData:[2000,1500,1300,1000,950,920]	
    }
    var jsonData5 = {
        trade1X:[960,753,582,421,392,389,368,235],
        trade1Y:['鲜肉类','蔬菜类','熟食类','水产类','家禽类','速食品','三鸟类','粮油类'],
        trande1Color:['#02A6B5','#007EC3','#DB6EFF','#FF9B59','#FF5050','#11A653','#B15C82','#8639A4']   
    }
    

    // 今日客流总数
    //createChart('今日客流总数',jsonData1);

    // 实时交易笔数趋势
	// createChart('实时交易笔数趋势',jsonData2);

    //会员交易占比
    //createChart('会员交易占比',jsonData3);

    //今日商户交易榜		
    //createChart('今日商户交易榜',jsonData4);

    //今日畅销榜
   // createChart('今日畅销榜',jsonData5);
    
    // 调用统一渲染方法
    function createChart(str,jsonData){
        //Android.getJson(str,jsonData.ledger3Color)
        if(str=='今日客流总数'){
            Echart2(jsonData.ledger3X,jsonData.ledger3Y,'ledger3',jsonData.ledger3Color,jsonData.unit,jsonData.isClear);
        }else if(str=='实时交易笔数趋势'){
            Echart3(jsonData.ledger4X,jsonData.ledger4Y,'ledger3',jsonData.ledger4Color,jsonData.unit,jsonData.isClear);
        }else if(str=='会员交易占比'){
            Echart5('会员交易占比','ledger3',jsonData.ledgerData,jsonData.colors,jsonData.isClear);
        }else if(str=='今日商户交易榜'){
            Echart7('ledger3',jsonData.xData,jsonData.yData,jsonData.unit,jsonData.isClear,jsonData.color);
        }else if(str=='今日畅销榜'){
            heEchart('ledger3',jsonData.trade1X.reverse(),jsonData.trade1Y.reverse(),jsonData.trande1Color,jsonData.unit,jsonData.isClear);
        }
    }

</script>
</html>